<div class="finder-detail">
	<h1 class="head-title" style="border:none">编辑用户</h1>
	<form id="edituser"  action="/desktop/users/editUser">
		<input type="hidden"  name="user[userId]"  value="<?php if(isset($user['userId']))echo $user['userId'];?>" />
		<div class="tableform">
			<h3>基本信息:</h3>
			<div style="cuevertical-align: middle" class="division">
				<table cellspacing="0" cellpadding="0" width="100%">
					<tbody>
				<tr>
					<th>
						<label>用户名：</label></th>
					<td>
						<input type="text" id="dom_el_ea78c40" disabled="disabled"  vtype="required"  value="<?php if(isset($user['username']))echo $user['username'];?>"  title="用户名：" class="x-input " autocomplete="off">
						<input type="button" id="chgPw" value="修改密码" title="修改密码" />
					</td>
				</tr>
				<tr>
					<th><em class="red">*</em>
						<label>姓名：</label></th>
					<td><input type="text" id="dom_el_ea78c43" vtype="required" name="user[realname]"  value="<?php if(isset($user['realname']))echo $user['realname'];?>" title="姓名：" class="x-input " autocomplete="off"></td>
				</tr>
				<tr>
					<th><em class="red">*</em>
						<label>手机号码：</label></th>
					<td><input type="text" id="dom_el_ea78c44" vtype="required" name="user[mobile]" title="手机号码：" class="x-input " autocomplete="off" value="<?php if(isset($user['mobile']))echo $user['mobile'];?>"></td>
				</tr>
				<tr>
					<th><em class="red">*</em>
						<label>启用：</label></th>
					<td><select id="dom_el_ea78c45" required="1" name="user[status]" type="select" title="启用：" class="x-input-select inputstyle">
							<option value="0"  <?php if($user['status'] == 'false') echo 'selected="selected"';?>>否</option>
							<option value="1" <?php if($user['status'] == 'true') echo 'selected="selected"';?>>是</option>
						</select>
					</td>
				</tr>
			</tbody>
				</table>
			</div>
		</div>
		<?php if($user['super'] == 'false') :?>
		<div class="tableform">
			<h3>用户组:</h3>
			<div class="division">
				<?php foreach($aGroups as $group):?>
					<label><input type="checkbox"  name="groupIds[]"  <?php if(isset($user['groupIds']) && in_array($group['groupId'], $user['groupIds'])) echo 'checked="checked"'?> value="<?php echo $group['groupId'];?>"><?php echo $group['name'];?></label>
				<?php endforeach?>
			</div>
		</div>
		<?php endif?>
	</form>
</div>
<div class="table-action" >
	<button type="button"  id="save-user" class="btn"><span><span>保存</span></span></button>
</div>
<script>
$('save-user').addEvent('click',function(e){
    e.stop();
    var _form=$('edituser');
    _form.fireEvent('submit',e);
});
$('chgPw').addEvent('click',function(e){
	 new Dialog('/desktop/users/showResetPwd?userId=<?php echo $user["userId"]?>', {width:370,height:180,title:'修改密码'});
});
</script>